echo Copying the feature...

rd /s /q "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\HiSoftware.SharePoint.Common"
mkdir "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\HiSoftware.SharePoint.Common"

copy /Y feature.xml  "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\HiSoftware.SharePoint.Common\"
copy /Y Elements.xml "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\HiSoftware.SharePoint.Common\"

echo Adding assemblies to the GAC...

::"%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf HiSoftware.SharePoint.Common
::"%programfiles%\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -if bin/debug/HiSoftware.SharePoint.Common.dll

:: Note: 64-bit alternative to lines above; uncomment these to install on a 64-bit machine
"%programfiles% (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -uf HiSoftware.SharePoint.Common
"%programfiles% (x86)\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" -if bin/debug/HiSoftware.SharePoint.Common.dll

echo Activating the feature...

pushd %programfiles%\common files\microsoft shared\web server extensions\12\bin

::Note: Uncomment these lines if you've modified your deployment xml files or IP forms 
::stsadm -o deactivatefeature -filename HiSoftware.SharePoint.Common\feature.xml -url http://localhost
::stsadm -o uninstallfeature -filename HiSoftware.SharePoint.Common\feature.xml

stsadm -o installfeature -filename HiSoftware.SharePoint.Common\feature.xml -force
stsadm -o activatefeature -filename HiSoftware.SharePoint.Common\feature.xml -url http://localhost


echo Doing an iisreset...
popd
iisreset